package com.melodyframe.stage.demo.web.controller;

import org.springframework.stereotype.Controller;

import com.melodyframe.common.context.ContextLocal;
import com.melodyframe.stage.annotation.Component;
import com.melodyframe.stage.annotation.Performer;

@Component
@Controller("home")
public class HomeController {

	@Performer(path = "/index")
	public String index(String name) {
		if (null == name || "".equals(name)) {
			return "error";
		}
		ContextLocal.put("name", "Mr. " + name);
		return null;
	}
}
